package com.ruoyi.controller;

import com.camp.domain.Collect;
import com.camp.service.ICollectService;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.service.IShoucangService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Anonymous
@RestController
@RequestMapping("/shoucang")
public class ShoucangController {
    @Autowired
    IShoucangService shoucangService;

    @Autowired
    private ICollectService collectService;
    @GetMapping("/list/{id}")
    public AjaxResult list(@PathVariable String id){
        System.out.println("213123123131231");
        System.out.println(id);
        Collect collect=new Collect();
        collect.setUserId(id);
//        shoucangService.selectall(collect);
        List<Collect> collects = collectService.selectCollectList(collect);

        System.out.println(collects);
        return AjaxResult.success(collects);
    }
}
